import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  // 最大级别的规则，对应的组件，会显示在 App.vue 中
  // 登录
  { path: '/login', component: () => import('@/views/Login.vue') },
  // 注册
  { path: '/reg', component: () => import('@/views/Reg.vue') },
  // 后台主页
  { path: '/', component: () => import('@/views/Home.vue') }
]

const router = new VueRouter({
  routes
})

export default router
